
export const sendStatusList = [
  { id: '0', name: '已发卡' },
  { id: '1', name: '未发卡' }
]

export const statusList = [
  { id: '0', name: '启用' },
  { id: '1', name: '禁用' }
]

export const targetSeachConfig = () => {
  return [
    {
      key: 'name',
      label: '类别名称'
    }
  ]
}

export const typeSeachConfig = () => {
  return [
    {
      key: 'typeName',
      label: '类别名称'
    },
    {
      key: 'status',
      label: '状态',
      type: 'select',
      fieldProps: {
        options: statusList
      },
      initialValue: '0'
    }
  ]
}

export const sendSeachConfig = () => {
  return [
    {
      key: 'status',
      label: '选择状态',
      type: 'select',
      fieldProps: {
        options: sendStatusList
      }
    }
  ]
}
export const checkResultSeachConfig = () => {
  return [
    {
      key: 'status',
      label: '检查类别',
      type: 'select',
      fieldProps: {
        options: sendStatusList
      }
    },
    {
      key: 'name',
      label: '检查时间',
      key1: 'beginDate',
      key2: 'endDate',
      type: 'daterange',
      fieldProps: {
        style: {
          width: '256px'
        }
      }
    }
  ]
}

export const targetColumnConfig = [
  {
    prop: 'sort',
    label: '序号',
    width: '80'
  },
  {
    prop: 'name',
    label: '检查对象'
  },
  {
    prop: 'type',
    label: '检查对象类别'
  },
  {
    prop: 'cardCode',
    label: '卡号'
  },
  {
    prop: 'cardTime',
    label: '发卡日期'
  },
  {
    prop: 'action',
    label: '操作',
    width: '164',
    align: 'center'
  }
]

export const typeColumnConfig = [
  {
    prop: 'typeName',
    label: '类别名称'
  },
  {
    prop: 'group',
    label: '所属机构'
  },
  {
    prop: 'sortType',
    label: '检查分类'
  },
  {
    prop: 'conclusionType',
    label: '结论类别'
  },
  {
    prop: 'targetType',
    label: '对象类别'
  },
  // {
  //   prop: 'recordType',
  //   label: '记录方式'
  // },
  {
    prop: 'whole',
    label: '部分提交',
    width: '90'
  },
  {
    prop: 'cycle',
    label: '巡检周期',
    width: '90'
  },
  {
    prop: 'status',
    label: '状态',
    width: '90'
  },
  {
    prop: 'action',
    label: '操作',
    align: 'center'
  }
]

export const sendColumnConfig = [
  {
    prop: 'target',
    label: '名称'
  },
  {
    prop: 'cardTime',
    label: '发卡日期'
  },
  {
    prop: 'card',
    label: '卡号'
  },
  {
    prop: 'cardCode',
    label: '卡内码'
  },
  {
    prop: 'action',
    label: '操作',
    width: '146',
    align: 'center'
  }
]

export const checkResultColumnConfig = [
  {
    prop: 'name',
    label: '检查名称',
    width: 400
  },
  {
    prop: 'scoreRate',
    label: '得分率'
  },
  {
    prop: 'projectNumber',
    label: '检查数/项目数'
  },
  {
    prop: 'projectCount',
    label: '得分/总分'
  },
  {
    prop: 'checkBy',
    label: '检查人'
  },
  {
    prop: 'checkDate',
    label: '检查时间'
  },
  {
    prop: 'action',
    label: '操作',
    width: '146',
    align: 'center'
  }
]

export const detailColumnConfig = [
  {
    prop: 'sortName',
    label: '检查项目'
  },
  {
    prop: 'recordSortName',
    label: '检查结果'
  },
  {
    prop: 'recordSortValue',
    label: '检查得分'
  },
  {
    prop: 'url',
    label: '检查照片'
  }
]

export const infoItems = (info) => {
  return [
    {
      label: '检查',
      key: 'name',
      initialValue: info.name
    },
    {
      label: '检查人',
      key: 'userName',
      initialValue: info.userName
    },
    {
      label: '得分/总分',
      key: 'recordCount',
      initialValue: `${info.recordCount}/${info.projectCount}`
    },
    {
      label: '得分率',
      key: 'percentage',
      initialValue: `${info.percentage}`
    }
  ]
}
